import request from "@/utils/request"
import type { categoryListModel } from "./model/categoryModel";

enum API{
  // GET /admin/product/getCategory1
  getCategory1List="/admin/product/getCategory1",
  // GET /admin/product/getCategory2/{category1Id}
  getCategory2List="/admin/product/getCategory2",
  // GET /admin/product/getCategory3/{category2Id}
  getCategory3List="/admin/product/getCategory3",
}


export const getCategory1List=()=>{
  return request.get<any,categoryListModel>(API.getCategory1List)
};
export const getCategory2List=(category1Id:number)=>{
  return request.get<any,categoryListModel>(API.getCategory2List+`/${category1Id}`)
};
export const getCategory3List=(category2Id:number)=>{
  return request.get<any,categoryListModel>(API.getCategory3List+`/${category2Id}`)
}